package com.fit.entities.presenceOnClasses;

import java.io.Serializable;

import javax.persistence.Embeddable;
import javax.persistence.ManyToOne;

import com.fit.entities.classes.Classes;
import com.fit.entities.course.Course;
import com.fit.entities.homework.Homework;
import com.fit.entities.professor.Professor;
import com.fit.entities.student.Student;

@Embeddable
public class PresenceOnClassesPk implements Serializable {

	@ManyToOne
	private Classes classes;
	@ManyToOne
	private Student student;

	public Classes getClasses() {
		return classes;
	}

	public void setClasses(Classes classes) {
		this.classes = classes;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		PresenceOnClassesPk that = (PresenceOnClassesPk) o;

		if (classes != null ? !classes.equals(that.classes) : that.classes != null)
			return false;
		if (student != null ? !student.equals(that.student)
				: that.student != null)
			return false;

		return true;
	}
}
